package cn.join.ideer.common.enums;

import cn.join.ideer.common.exceptions.IErrorCode;

/**
 * @author shinyiqi
 * @date 2023/3/5 0:17
 */
public enum ResultCode implements IErrorCode {
    /**
     * 异常错误码
     */
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(400, "参数检验失败");

    private final int code;
    private final String message;

    private ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}